class_name StageTransition
extends Control



@onready var animationPlayer: AnimationPlayer = $AnimationPlayer



const ANIMATION_IDLE := "idle"
const ANIMATION_START_TRANSITION := "start_transition"
const ANIMATION_END_TRANSITION := "end_transition"
const ANIMATION_INTERIM := "interim"



func start_transition():
	animationPlayer.play(ANIMATION_START_TRANSITION)


func end_transition():
	animationPlayer.play(ANIMATION_END_TRANSITION)


func on_start_transition_completed():
	animationPlayer.play(ANIMATION_INTERIM)
	StageManager.stage_interim.emit()


func on_end_transition_completed():
	animationPlayer.play(ANIMATION_IDLE)
